package demo;

public class LogIn {
    private String userName = "admin";
    private String passWord = "123456";

    public void loginInfo(String userName,String passWord) {
        if(!this.userName.equals(userName)) {
            System.out.println("用户名错误！");
            return;
        }

        if(!this.passWord.equals(passWord)) {
            System.out.println("密码错误！");
            return;
        }

        System.out.println("登陆成功");
    }

    public static void main(String[] args) {
        LogIn logIn = new LogIn();
        logIn.loginInfo("admin","123456");
    }
}
